<?php
require(dirname(__FILE__) . '/includes/init.php');
$time = time()-5*24*3600;
$sql = "select products_sn,products_name from ".$ecs->table('yihaodian')." where provider='悦国酒类专营店' and add_time>$time group by products_sn";
//echo $sql;
$youhi_list = $db->getAll($sql);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>管理中心 - 五天内youhi记录 </title>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="styles/general.css" rel="stylesheet" type="text/css" />
<link href="styles/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
</head>
<body>
 
<h1>
<span class="action-span1"><a target="_top" href="index.php?act=main">管理中心</a> </span><span id="search_id" class="action-span1"> - 五天内youhi记录 </span>
<div style="clear:both"></div>
</h1>
<div class="list-div" id="listDiv">
<table cellpadding="3" cellspacing="1">
  <tr>
    <th>SKU</th>
	<th>商品名</th>
	<th>操作</th>
  <tr>
  <?php
  if(count($youhi_list)>0){
	foreach($youhi_list AS $index => $youhi){
  ?>
  <tr>
    <td><?php echo $youhi['products_sn'];?></td>
	<td><a href="http://www.yihaodian.com/product/<?php echo  $youhi['products_sn'];?>" target="_blank"><?php echo $youhi['products_name'];?></a></td>
	<td><a href="yihaodian_chat_table.php?act=view&sn=<?php echo $youhi['products_sn'];?>&time=<?php echo $time;?>">查看</a></td>
  </tr>
  <?php
	}
  }
  ?>
  </table>
</div>
</body>
</html>